package com.ims.core.enums;

/**
 * 处理结果
 * 0    任务执行中
 * 1    认证成功
 * 2    未获取到本发票或本发票之前已勾选
 * 3    该票异常无法认证
 * 4    该票已经认证
 * 5    该票已经逾期无法认证
 * 6    该票已经申请认证
 * 7    申请认证月份已过期
 * 8    其它异常
 * 9    发票未到期(需切换税期)
 * 11    该票已作废
 * 12    该发票已红冲
 * 13    未到申报期
 * 14    该发票税号不匹配
 * 15    红字发票不可认证
 * 16    认证类型错误
 * 17    信用等级异常或无权限
 * 18    登陆税局失败
 * 20    有效税额异常(有效税额大于实际税额)
 * 21    当期已锁定
 * 23    发票未勾选（确认）
 * 24    取消操作不匹配
 * 29    税额为0不能勾选
 * 41    需等待上次申请完成
 * 50    失控发票无法勾选
 * 51    该票已被红字锁定
 * 52    该票已勾选的税期和当前税期不一致
 * @author IMS
 */
public enum ResultCode {
    TASK_EXECUTING(0, "任务执行中"),
    AUTHENTICATION_SUCCESS(1, "认证成功"),
    INVOICE_NOT_FOUND_OR_ALREADY_CHECKED(2, "未获取到本发票或本发票之前已勾选/无此票"),
    INVOICE_ABNORMAL_UNAUTHENTICABLE(3, "该票异常无法认证"),
    INVOICE_ALREADY_AUTHENTICATED(4, "该票已经认证"),
    INVOICE_OVERDUE_UNAUTHENTICABLE(5, "该票已经逾期无法认证"),
    INVOICE_ALREADY_APPLIED_AUTHENTICATION(6, "该票已经申请认证"),
    APPLICATION_MONTH_OVERDUE(7, "申请认证月份已过期"),
    OTHER_ABNORMALITIES(8, "其它异常"),
    INVOICE_NOT_DUE_NEED_TAX_PERIOD_SWITCH(9, "发票未到期(需切换税期)"),
    INVOICE_VOIDED(11, "该票已作废"),
    INVOICE_RED_STAMPED(12, "该发票已红冲"),
    NOT_YET_DECLARATION_PERIOD(13, "未到申报期"),
    INVOICE_TAX_NUMBER_MISMATCH(14, "该发票税号不匹配"),
    RED_INVOICE_UNAUTHENTICABLE(15, "红字发票不可认证"),
    AUTHENTICATION_TYPE_ERROR(16, "认证类型错误"),
    CREDIT_RATING_ABNORMAL_OR_NO_PERMISSION(17, "信用等级异常或无权限"),
    LOGIN_TAX_BUREAU_FAILED(18, "登陆税局失败"),
    EFFECTIVE_TAX_AMOUNT_ABNORMAL(20, "有效税额异常(有效税额大于实际税额)"),
    CURRENT_PERIOD_LOCKED(21, "当期已锁定"),
    INVOICE_NOT_CHECKED_CONFIRMED(23, "发票未勾选（确认）"),
    CANCEL_OPERATION_MISMATCH(24, "取消操作不匹配"),
    TAX_AMOUNT_ZERO_UNCHECKABLE(29, "税额为0不能勾选"),
    WAIT_FOR_PREVIOUS_APPLICATION_COMPLETE(41, "需等待上次申请完成"),
    ERROR_TIME_FRAME(42, "勾选时间范围有误"),
    OUT_OF_CONTROL_INVOICE_UNCHECKABLE(50, "失控发票无法勾选"),
    INVOICE_RED_LOCKED(51, "该票已被红字锁定"),
    INVOICE_CHECKED_TAX_PERIOD_MISMATCH(52, "该票已勾选的税期和当前税期不一致");

    private final int code;
    private final String name;

    ResultCode(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }
}
